#ifndef __XCRYPT_H__
#define __XCRYPT_H__

#include <string>
#include <openssl/des.h>

class XCrypt
{
public:
    bool init(const std::string &password);
    int encypt(const char *inData, int inSize, char *outData, bool isEnd = false);
    int Dencypt(const char *inData, int inSize, char *outData, bool isEnd = false);
    int getPadding(int dataSize);
private:
    DES_key_schedule keySch_;
};


#endif
